package com.symone.webcms.model.vo;

import com.symone.webcms.model.Menu;
import com.symone.webcms.model.MenuAction;
import com.symone.webcms.model.base.TreeNode;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class MenuVO implements Serializable {

    private Long id;
    private Long pid;
    private String name;
    private String code;
    private Integer deep;
    private String shiroCode;
    private String url;
    private String icon;
    private Integer sorting;
    private Integer shortCut;
    private Integer display;
    private Integer deleted;
    private Date createTime;
    private Date updateTime;
    private String[] actions;

    public Menu getMenu(){
        Menu menu = new Menu();
        menu.setId(this.id);
        menu.setPid(this.pid);
        menu.setName(this.name);
        menu.setCode(this.code);
        menu.setDeep(this.deep);
        menu.setShiroCode(this.shiroCode);
        menu.setUrl(this.url);
        menu.setIcon(this.icon);
        menu.setSorting(this.sorting);
        menu.setShortCut(this.shortCut);
        menu.setDisplay(this.display);
        menu.setDeleted(this.deleted);
        menu.setCreateTime(this.createTime);
        menu.setUpdateTime(this.updateTime);
        return menu;
    }
}
